# Dockerfile for microservices-spring-cloud-app
# Build with:
# docker build -t microservices-spring-cloud-app .
# Run with:
# docker run -p 19090:19090 -d -v /tmp/logs:/opt/logs --name microservices-spring-cloud-app microservices-spring-cloud-app

FROM docker.apiacmed.com/acmedback/kernel:0.1.0
MAINTAINER Stefan.Gu

ENV VERSION 0.3.0.BUILD-SNAPSHOT

RUN echo "http://mirrors.aliyun.com/alpine/v3.6/main" > /etc/apk/repositories \
    && echo "http://mirrors.aliyun.com/alpine/v3.6/community" >> /etc/apk/repositories \
    && apk update upgrade \
    && apk add --no-cache procps unzip curl bash tzdata \
    && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo "Asia/Shanghai" > /etc/timezone

ADD exchange-center-spring-cloud-nacos-app-${VERSION}.zip /exchange-center-spring-cloud-nacos-app/exchange-center-spring-cloud-nacos-app-${VERSION}.zip

RUN unzip /exchange-center-spring-cloud-nacos-app/exchange-center-spring-cloud-nacos-app-${VERSION}.zip -d /exchange-center-spring-cloud-nacos-app \
    && rm -rf /exchange-center-spring-cloud-nacos-app/exchange-center-spring-cloud-nacos-app-${VERSION}.zip

ENV ServiceRoot /exchange-center-spring-cloud-nacos-app

ENV ControlCenterAddress 172.172.2.125:9998

EXPOSE 9000

CMD ["sh","/go/startup.sh"]
